tests: Small tweaks to pull corruption test
authorColin Walters <walters@verbum.org>
Sun, 19 Jan 2014 16:48:27 +0000 (11:48 -0500)
committerColin Walters <walters@verbum.org>
Sun, 19 Jan 2014 16:48:27 +0000 (11:48 -0500)
This one is failing here, I suspect it's the generic pull race
condition, but these fixes should make it slightly more reliable.

tests/pull-test.sh
tests/test-pull-corruption.sh

index 5a96b08716c7f17ef039e1a05266bf5a2c6e4307..82e70042f485d5ff162e9dda92fe373ca1598b98 100755 (executable)
@@ -17,6 +17,8 @@
 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
+set -e
+
 cd ${test_tmpdir}
 mkdir repo
 ${CMD_PREFIX} ostree --repo=repo init
index 394a9e81a0ba25fd7279882cfc172a03b9ff3f26..b042a0c058fb82fa869b2fd5a09f7336c789336d 100755 (executable)
@@ -39,7 +39,8 @@ do_corrupt_pull_test() {
     fi
     rm -rf ${repopath}
     cp -a ${repopath}.orig ${repopath}
-    if ${CMD_PREFIX} ostree --repo=repo pull origin main && ${CMD_PREFIX} ostree --repo=repo fsck; then
+    ${CMD_PREFIX} ostree --repo=repo pull origin main
+    if ${CMD_PREFIX} ostree --repo=repo fsck; then
         echo "ok pull with correct data worked"
     else
         assert_not_reached "pull with correct data failed!"